package svc

import (
	"duoduo/api/internal/config"
	"duoduo/duoduorpc/duoduorpcclient"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config    config.Config
	DuoduoRpc duoduorpcclient.Duoduorpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:    c,
		DuoduoRpc: duoduorpcclient.NewDuoduorpc(zrpc.MustNewClient(c.DuoduoRpc)),
	}
}
